package org.dna.metronomo.persistence;

import java.util.List;
import org.tigris.scarab.model.Issue;
import org.tigris.scarab.model.IssueType;
import org.tigris.scarab.model.Module;

/**
 *
 * @author andrea
 */
public interface IIssueDAO {

    /**
     * Return the list of all issues registered on the DB.
     */
    List<Issue> allIssues() throws PersistenceException;

    /**
     * Inserts the issue as child of the module.
     */
    void insert(Issue issue, Module module, IssueType type) throws PersistenceException;

    Issue findByID(long key) throws PersistenceException;

    List<IssueType> allTypes() throws PersistenceException;
}
